import request from '@/utils/request'

/**
 * @description 登录
 * @export
 * @param {*} data
 * @return {*}
 */
export async function login(data) {
  return request.post('/user/login', data)
}

/**
 * @description 登出
 * @export
 * @return {*}
 */
export function logout() {
  request.post('/user/logout')
}

/**
 * @description 获取菜单
 * @export
 * @param {*} accessToken
 * @return {*}
 */
export async function getMenus(accessToken) {
  return request.get('/user/getMenus', { accessToken })
}

/**
 * @description 获取用户信息
 * @export
 * @param {*} accessToken
 * @return {*}
 */
export async function getUserinfo(accessToken) {
  return request.get('/user/getUserinfo', { accessToken })
}
